package com.slkj.shilixiaoyuanapp.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created  on 2018-08-21
 *
 * @author 唐开阔
 * @describe
 */
public class ToolWplyDetailEntity implements Parcelable{

    /**
     * id : 36
     * intime : 2018-08-20
     * get : 绿板
     * count : 25
     * department : {"dId":1,"dName":"教务部"}
     * body : 写字
     * state : 1
     * auditor : [{"uId":2,"uName":"任浩","headImg":"http://192.168.1.73:8081/images/school3/moraCharacter/1534741401121.jpg"}]
     * refute :
     * img : []
     * urge : false
     */

    private int id;
    private String intime;
    private String get;
    private String count;
    private DepartmentEntity department;
    private String body;
    private int state;
    private String refute;
    private boolean urge;
    private ArrayList<PeopleEntity> auditor;
    private int myState;


    protected ToolWplyDetailEntity(Parcel in) {
        id = in.readInt();
        intime = in.readString();
        get = in.readString();
        count = in.readString();
        department = in.readParcelable(DepartmentEntity.class.getClassLoader());
        body = in.readString();
        state = in.readInt();
        refute = in.readString();
        urge = in.readByte() != 0;
        auditor = in.createTypedArrayList(PeopleEntity.CREATOR);
        myState = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(intime);
        dest.writeString(get);
        dest.writeString(count);
        dest.writeParcelable(department, flags);
        dest.writeString(body);
        dest.writeInt(state);
        dest.writeString(refute);
        dest.writeByte((byte) (urge ? 1 : 0));
        dest.writeTypedList(auditor);
        dest.writeInt(myState);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ToolWplyDetailEntity> CREATOR = new Creator<ToolWplyDetailEntity>() {
        @Override
        public ToolWplyDetailEntity createFromParcel(Parcel in) {
            return new ToolWplyDetailEntity(in);
        }

        @Override
        public ToolWplyDetailEntity[] newArray(int size) {
            return new ToolWplyDetailEntity[size];
        }
    };

    public int getMyState() {
        return myState;
    }

    public void setMyState(int myState) {
        this.myState = myState;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getIntime() {
        return intime;
    }

    public void setIntime(String intime) {
        this.intime = intime;
    }

    public String getGet() {
        return get;
    }

    public void setGet(String get) {
        this.get = get;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public DepartmentEntity getDepartment() {
        return department;
    }

    public void setDepartment(DepartmentEntity department) {
        this.department = department;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getRefute() {
        return refute;
    }

    public void setRefute(String refute) {
        this.refute = refute;
    }

    public boolean isUrge() {
        return urge;
    }

    public void setUrge(boolean urge) {
        this.urge = urge;
    }

    public ArrayList<PeopleEntity> getAuditor() {
        return auditor;
    }

    public void setAuditor(ArrayList<PeopleEntity> auditor) {
        this.auditor = auditor;
    }


}
